{% extends 'athletelog/include/settings_base.html' %}
{% load athletelog_tags %}
{% block settings_content %}
{% settings_submenu "friends" %}

<div class="settings_content friends">
<h3 class="textversion">Kamarádi</h3>
{% if athlete %}
<h4 class="group_name">Moje skupina</h4>
    <dl id="my_group_friends">
    {% for ath_data in my_group_athletes %}
        {% with ath_data.athlete.person as person %}
        {% with ath_data.athlete as athlete %}
        {% with ath_data.athlete.person.user.username as username %}
        {% with ath_data.view_status as view_status %}
            {% include 'athletelog/include/settings_friends_row.html' %}
        {% endwith %}
        {% endwith %}
        {% endwith %}
        {% endwith %}
    {% endfor %}
    </dl>
{% endif %}
<h4 class="group_name">Ostatní</h4>
<dl id="other_persons">
{% for p in other_persons %}
    {% with p.person as person %}
    {% with p.athlete as athlete %}
    {% with p.person.user.username as username %}
    {% with p.view_status as view_status %}
        {% include 'athletelog/include/settings_friends_row.html' %}
    {% endwith %}
    {% endwith %}
    {% endwith %}
    {% endwith %}
{% endfor %}
</dl>
<a href="{% url athletelog.views.settings.friends_add %}">Sledovat atleta</a>
{% if athlete %}
    {% if blocked_persons|length_is:"0" %}{% else %}
<h4 class="group_name">Blokovaní</h4>
    {% endif %}
<dl id="blocked_persons">
{% for p in blocked_persons %}
    {% with p as person %}
    {% with p.athlete as athlete %}
    {% with p.user.username as username %}
    {% with "True" as blocks %}
        {% include 'athletelog/include/settings_friends_row.html' %}
    {% endwith %}
    {% endwith %}
    {% endwith %}
    {% endwith %}
{% endfor %}
</dl>
{% endif %}
</div>

{% endblock %}

